// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class PID : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Set ID - Patient ID",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"SI")]
	    public SI SetIDPatientID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Patient ID External",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"CX")]
	    public CX PatientIDExternal {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Patient Identifier List Internal",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.True, HL7Required.True,"CX")]
	    public CX[] PatientIdentifierListInternal {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Alternate Patient ID",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.True, HL7Required.True,"CX")]
	    public CX[] AlternatePatientID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Patient Name",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.True, HL7Required.True,"XPN")]
		[NameType]
	    public XPN[] PatientName {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Mother's Maiden Name",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.True, HL7Required.True,"XPN")]
	    public XPN[] MothersMaidenName {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Date of Birth",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DateofBirth {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Sex",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"CWE")]
		[AdministrativeSex]
	    public CWE Sex {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Patient Alias",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.True, HL7Required.True,"XPN")]
	    public XPN[] PatientAlias {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Race",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.True, HL7Required.True,"CE_0005")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.True, HL7Required.True,"CE_0005")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.True, HL7Required.True,"CWE")]
		[Race]
	    public CWE[] Race {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Patient Address",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.True, HL7Required.True,"XAD")]
	    public XAD[] PatientAddress {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 County Code",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"IS")]
		[CountyParish]
	    public IS CountyCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Phone Number - Home",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.True, HL7Required.True,"XTN")]
	    public XTN[] PhoneNumberHome {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Phone Number - Business",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.True, HL7Required.True,"XTN")]
	    public XTN[] PhoneNumberBusiness {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Primary Language",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.False, HL7Required.True,"CE_0296")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.False, HL7Required.True,"CE_0296")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"CE_0296")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.False, HL7Required.True,"CWE")]
		[PrimaryLanguage]
	    public CWE PrimaryLanguage {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Marital Status",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.False, HL7Required.True,"CE_0002")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"CE_0002")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"CWE")]
		[MaritalStatus]
	    public CWE MaritalStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Religion",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.False, HL7Required.True,"CE_0006")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.False, HL7Required.True,"CE_0006")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"CWE")]
		[Religion]
	    public CWE Religion {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Patient Account Number",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"CX")]
		[CheckDigitScheme]
	    public CX PatientAccountNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 SSN Number - Patient",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST SSNNumberPatient {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Driver's License Number",20)]
  	    [HL7Field(HL7Version.v23, 20, HL7Repeat.False, HL7Required.True,"DLN")]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.False, HL7Required.True,"DLN")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.False, HL7Required.True,"DLN")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.False, HL7Required.True,"DLN")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.False, HL7Required.True,"DLN")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"DLN")]
	    public DLN DriversLicenseNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Mother's Identifier",21)]
  	    [HL7Field(HL7Version.v23, 21, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 21, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"CX")]
		[CheckDigitScheme]
	    public CX[] MothersIdentifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Ethnic Group",22)]
  	    [HL7Field(HL7Version.v23, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 22, HL7Repeat.True, HL7Required.True,"CE_0189")]
  	    [HL7Field(HL7Version.v24, 22, HL7Repeat.True, HL7Required.True,"CE_0189")]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.True, HL7Required.True,"CWE")]
		[EthnicGroup]
	    public CWE[] EthnicGroup {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Birth Place",23)]
  	    [HL7Field(HL7Version.v23, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST BirthPlace {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Multiple Birth Indicator",24)]
  	    [HL7Field(HL7Version.v23, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID MultipleBirthIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Birth Order",25)]
  	    [HL7Field(HL7Version.v23, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BirthOrder {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("26 Citizenship",26)]
  	    [HL7Field(HL7Version.v23, 26, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 26, HL7Repeat.True, HL7Required.True,"CE_0171")]
  	    [HL7Field(HL7Version.v24, 26, HL7Repeat.True, HL7Required.True,"CE_0171")]
  	    [HL7Field(HL7Version.v25, 26, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 26, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 26, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 26, HL7Repeat.True, HL7Required.True,"CWE")]
		[Citizenship]
	    public CWE[] Citizenship {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("27 Veterans Military Status",27)]
  	    [HL7Field(HL7Version.v23, 27, HL7Repeat.False, HL7Required.True,"CE_0172")]
  	    [HL7Field(HL7Version.v231, 27, HL7Repeat.False, HL7Required.True,"CE_0172")]
  	    [HL7Field(HL7Version.v24, 27, HL7Repeat.False, HL7Required.True,"CE_0172")]
  	    [HL7Field(HL7Version.v25, 27, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 27, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 27, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 27, HL7Repeat.False, HL7Required.True,"CWE")]
		[VeteransMilitaryStatus]
	    public CWE VeteransMilitaryStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("28 Nationality Code",28)]
  	    [HL7Field(HL7Version.v23, 28, HL7Repeat.False, HL7Required.True,"CE_0212")]
  	    [HL7Field(HL7Version.v231, 28, HL7Repeat.False, HL7Required.True,"CE_0212")]
  	    [HL7Field(HL7Version.v24, 28, HL7Repeat.False, HL7Required.True,"CE_0212")]
  	    [HL7Field(HL7Version.v25, 28, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 28, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 28, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 28, HL7Repeat.False, HL7Required.True,"CWE")]
		[Nationality]
	    public CWE NationalityCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("29 Patient Death Date and Time",29)]
  	    [HL7Field(HL7Version.v23, 29, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 29, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 29, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 29, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 29, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 29, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 29, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM PatientDeathDateandTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("30 Patient Death Indicator",30)]
  	    [HL7Field(HL7Version.v23, 30, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 30, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 30, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 30, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 30, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 30, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 30, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID PatientDeathIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("31 Identity Unknown Indicator",31)]
  	    [HL7Field(HL7Version.v24, 31, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 31, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 31, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 31, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 31, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID IdentityUnknownIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("32 Identity Reliability Code",32)]
  	    [HL7Field(HL7Version.v24, 32, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 32, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 32, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 32, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 32, HL7Repeat.True, HL7Required.True,"CWE")]
		[IdentityReliabilityCode]
	    public CWE[] IdentityReliabilityCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("33 Last Update Date/Time",33)]
  	    [HL7Field(HL7Version.v24, 33, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 33, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 33, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 33, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 33, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM LastUpdateDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("34 Last Update Facility",34)]
  	    [HL7Field(HL7Version.v24, 34, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v25, 34, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v251, 34, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v26, 34, HL7Repeat.False, HL7Required.True,"HD")]
  	    [HL7Field(HL7Version.v27, 34, HL7Repeat.False, HL7Required.True,"HD")]
	    public HD LastUpdateFacility {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("35 Species Code",35)]
  	    [HL7Field(HL7Version.v24, 35, HL7Repeat.False, HL7Required.True,"CE_0446")]
  	    [HL7Field(HL7Version.v25, 35, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 35, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 35, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 35, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpeciesCode]
	    public CWE SpeciesCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("36 Breed Code",36)]
  	    [HL7Field(HL7Version.v24, 36, HL7Repeat.False, HL7Required.True,"CE_0447")]
  	    [HL7Field(HL7Version.v25, 36, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 36, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 36, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 36, HL7Repeat.False, HL7Required.True,"CWE")]
		[BreedCode]
	    public CWE BreedCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("37 Strain",37)]
  	    [HL7Field(HL7Version.v24, 37, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 37, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 37, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 37, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 37, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST Strain {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("38 Production Class Code",38)]
  	    [HL7Field(HL7Version.v24, 38, HL7Repeat.False, HL7Required.True,"CE_0429")]
  	    [HL7Field(HL7Version.v25, 38, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 38, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 38, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 38, HL7Repeat.False, HL7Required.True,"CWE")]
		[ProductionClassCode]
	    public CWE ProductionClassCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("39 Tribal Citizenship",39)]
  	    [HL7Field(HL7Version.v25, 39, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 39, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 39, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 39, HL7Repeat.True, HL7Required.True,"CWE")]
		[Citizenship]
	    public CWE[] TribalCitizenship {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("40 Patient Telecommunication Information",40)]
  	    [HL7Field(HL7Version.v27, 40, HL7Repeat.True, HL7Required.True,"XTN")]
	    public XTN[] PatientTelecommunicationInformation {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 46)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 47)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 48)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 49)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 50)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 51)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 52)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 53)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 54)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 55)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 56)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 57)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 58)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 59)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 60)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SetIDPatientID = (SI)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(SI), "PID.1");
			PatientIDExternal = (CX)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(CX), "PID.2");
	    	PatientIdentifierListInternal = (CX[])ParseTextAtPositionIntoDataArray<CX>(segmentTextParts, 3, options, "PID.3");
	    	AlternatePatientID = (CX[])ParseTextAtPositionIntoDataArray<CX>(segmentTextParts, 4, options, "PID.4");
	    	PatientName = (XPN[])ParseTextAtPositionIntoDataArray<XPN>(segmentTextParts, 5, options, "PID.5");
	    	MothersMaidenName = (XPN[])ParseTextAtPositionIntoDataArray<XPN>(segmentTextParts, 6, options, "PID.6");
			DateofBirth = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(DTM), "PID.7");
			Sex = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(CWE), "PID.8");
	    	PatientAlias = (XPN[])ParseTextAtPositionIntoDataArray<XPN>(segmentTextParts, 9, options, "PID.9");
	    	Race = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 10, options, "PID.10");
	    	PatientAddress = (XAD[])ParseTextAtPositionIntoDataArray<XAD>(segmentTextParts, 11, options, "PID.11");
			CountyCode = (IS)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(IS), "PID.12");
	    	PhoneNumberHome = (XTN[])ParseTextAtPositionIntoDataArray<XTN>(segmentTextParts, 13, options, "PID.13");
	    	PhoneNumberBusiness = (XTN[])ParseTextAtPositionIntoDataArray<XTN>(segmentTextParts, 14, options, "PID.14");
			PrimaryLanguage = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(CWE), "PID.15");
			MaritalStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(CWE), "PID.16");
			Religion = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(CWE), "PID.17");
			PatientAccountNumber = (CX)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(CX), "PID.18");
			SSNNumberPatient = (ST)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(ST), "PID.19");
			DriversLicenseNumber = (DLN)ParseTextAtPositionIntoData(segmentTextParts, 20, options, typeof(DLN), "PID.20");
	    	MothersIdentifier = (CX[])ParseTextAtPositionIntoDataArray<CX>(segmentTextParts, 21, options, "PID.21");
	    	EthnicGroup = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 22, options, "PID.22");
			BirthPlace = (ST)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(ST), "PID.23");
			MultipleBirthIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 24, options, typeof(ID), "PID.24");
			BirthOrder = (NM)ParseTextAtPositionIntoData(segmentTextParts, 25, options, typeof(NM), "PID.25");
	    	Citizenship = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 26, options, "PID.26");
			VeteransMilitaryStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 27, options, typeof(CWE), "PID.27");
			NationalityCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 28, options, typeof(CWE), "PID.28");
			PatientDeathDateandTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 29, options, typeof(DTM), "PID.29");
			PatientDeathIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 30, options, typeof(ID), "PID.30");
			IdentityUnknownIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 31, options, typeof(ID), "PID.31");
	    	IdentityReliabilityCode = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 32, options, "PID.32");
			LastUpdateDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 33, options, typeof(DTM), "PID.33");
			LastUpdateFacility = (HD)ParseTextAtPositionIntoData(segmentTextParts, 34, options, typeof(HD), "PID.34");
			SpeciesCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 35, options, typeof(CWE), "PID.35");
			BreedCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 36, options, typeof(CWE), "PID.36");
			Strain = (ST)ParseTextAtPositionIntoData(segmentTextParts, 37, options, typeof(ST), "PID.37");
			ProductionClassCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 38, options, typeof(CWE), "PID.38");
	    	TribalCitizenship = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 39, options, "PID.39");
	    	PatientTelecommunicationInformation = (XTN[])ParseTextAtPositionIntoDataArray<XTN>(segmentTextParts, 40, options, "PID.40");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("PID");
		    segmentParts.Add(SetIDPatientID);
			segmentParts.Add(GetER7TextForSegmentPart(PatientIDExternal, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PatientIdentifierListInternal, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(AlternatePatientID, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PatientName, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(MothersMaidenName, options));
			segmentParts.Add(GetER7TextForSegmentPart(DateofBirth, options));
			segmentParts.Add(GetER7TextForSegmentPart(Sex, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PatientAlias, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(Race, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PatientAddress, options));
		    segmentParts.Add(CountyCode);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PhoneNumberHome, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PhoneNumberBusiness, options));
			segmentParts.Add(GetER7TextForSegmentPart(PrimaryLanguage, options));
			segmentParts.Add(GetER7TextForSegmentPart(MaritalStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(Religion, options));
			segmentParts.Add(GetER7TextForSegmentPart(PatientAccountNumber, options));
		    segmentParts.Add(SSNNumberPatient);
			segmentParts.Add(GetER7TextForSegmentPart(DriversLicenseNumber, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(MothersIdentifier, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(EthnicGroup, options));
		    segmentParts.Add(BirthPlace);
		    segmentParts.Add(MultipleBirthIndicator);
			segmentParts.Add(GetER7TextForSegmentPart(BirthOrder, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(Citizenship, options));
			segmentParts.Add(GetER7TextForSegmentPart(VeteransMilitaryStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(NationalityCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(PatientDeathDateandTime, options));
		    segmentParts.Add(PatientDeathIndicator);
		    segmentParts.Add(IdentityUnknownIndicator);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(IdentityReliabilityCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(LastUpdateDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(LastUpdateFacility, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpeciesCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(BreedCode, options));
		    segmentParts.Add(Strain);
			segmentParts.Add(GetER7TextForSegmentPart(ProductionClassCode, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(TribalCitizenship, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PatientTelecommunicationInformation, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

